package com.xjrsoft.common.querys;

import com.baomidou.mybatisplus.generator.config.querys.MySqlQuery;

public class XjrMysqlQuery extends MySqlQuery {

    @Override
    public String tableFieldsSql() {
        return "select `COLUMN_NAME` as \"Field\", `DATA_TYPE` as \"Type\", `IS_NULLABLE` as \"Null\", " +
                "`EXTRA` as \"Extra\", `COLUMN_KEY` as \"Key\", `COLUMN_COMMENT` as \"Comment\", " +
                "if(`DATA_TYPE` = 'int', `NUMERIC_PRECISION`, `CHARACTER_MAXIMUM_LENGTH`) " +
                "as \"MAX_LENGTH\" from information_schema.`COLUMNS` where `TABLE_NAME` " +
                "= '%s' and `TABLE_SCHEMA` = '#schema'";
    }
}
